import 'package:WebTest/chooseFood/core/router/BDRouterManager.dart';
import 'package:WebTest/chooseFood/core/viewModel/meal_view_model.dart';
import 'package:WebTest/screenLayout/size_fit.dart';
import 'package:WebTest/theme/theme_manager.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

void main() {
  runApp(ChangeNotifierProvider(
    create: (context) => BDMealViewModel(),
    child: MyApp(),
  ));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    HYSizeFit.initialize();
    return MaterialApp(
      title: '美食',
      theme: HYMyAppTheme.normalTheme,
      darkTheme: HYMyAppTheme.darkTheme,
      initialRoute: BDRouterManager.initialRoute,
      routes: BDRouterManager.routers,
      onGenerateRoute: BDRouterManager.generateRouter,
      onUnknownRoute: BDRouterManager.unknownRouter,
    );
  }
}
